package cn.edu.scau.cmi.xiaozecheng.simpleFactoryMethod;

import cn.edu.scau.cmi.xiaozecheng.domain.Beef;
import cn.edu.scau.cmi.xiaozecheng.domain.Chicken;
import cn.edu.scau.cmi.xiaozecheng.domain.Meat;
import cn.edu.scau.cmi.xiaozecheng.domain.Pork;

public class MeatSimpleFactory {
    public static Meat getInstance(String type) {
        Meat meat = null;
        switch (type) {
            case "Beef":
                meat = new Beef();
                break;
            case "Pork":
                meat = new Pork();
                break;
            case "Chicken":
                meat = new Chicken();
                break;
            default:
                break;
        }
        return meat;
    }
}




